/* 药店中心js */
$(function(){
	//校验登陆信息
	/* checkUSBD_shop("shop_index.htm"); */ 
	/* RxStateCode = "1";
	$('.collapse .js-category').click(function () {
	    $parent = $(this).parent('li');
	    if ($parent.hasClass('js-show')) {
	        $parent.removeClass('js-show');
	        $(this).children('i').removeClass('icon-35').addClass('icon-74');
	    } else {
	        $parent.siblings().removeClass('js-show');
	        $parent.addClass('js-show');
	        $(this).children('i').removeClass('icon-74').addClass('icon-35');
	        $parent.siblings().find('i').removeClass('icon-35').addClass('icon-74');
	    }
	}); 
	
	$("#shop_name").html("药店：" + jsonShop.shop_name);
	$("#pShopAddress").html("地址：" + jsonShop.shop_address);
	$("#pMobile").html("用户：" + jsonShop.true_name + "(" + (isSpace(jsonShop.mobile) ? jsonShop.user_name : jsonShop.mobile) + ")");
	cflz_service_url = "http://zz.nxk520.com/netcflz_wx/service/app_data_action_shop.ashx";
	GetPageData('最新信息', { "actName": "Shop", "actTag": "Get_News", "shop_code": "1" }, showNewsList);*/
	
	/* 获取药店的基本信息 */
	if(sessionStorage.getItem("group_name") !== null && sessionStorage.getItem("group_name") !== ""){
		$("#login").css("display", "unset");
		$("#exit_login").css("display", "none");
	}else{
		$("#login").css("display", "none");
		$("#exit_login").css("display", "unset");
	}
	
	$("#shop_name").html("<strong>" + localStorage.getItem("u_group_name") + "</strong>");
	$("#shop_address").html(sessionStorage.getItem("group_address"));
	
	/* a标签的点击事件 */
	$(".center-body-container").on("click", "a", function(){
		var type = $(this).attr("id");
		if(type !== "shop_exit_login"){
			window.location.href = type + ".html";
			
		}else{
			$.confirm("您确定要退出登陆吗?", "确认退出?", function() {
				$.toast("退出成功!");
				 exitLogin();
				 
				$("#login").css("display", "none");
				$("#exit_login").css("display", "unset");
			}, function() {
				
			});
	
		}
	})
	
})